﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SCG.SolarVengeance
{
    public class BaseForm : Form
    {
        //set fonts
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            foreach (Control ctl in Controls)
                SetFont(ctl);
        }
        private void SetFont(Control ctl)
        {
            Font f = new Font(MainForm.Instance.FontFamily, ctl.Font.Size, ctl.Font.Style);
            ctl.Font = f;
            foreach (Control child in ctl.Controls)
                SetFont(child);
        }
    }
}
